1. Field of the Invention
The present invention relates generally to a printer for printing out in sequence, on a desired page by page basis, print data transferred from a host associated by way of a network, and to a method of controlling the printer as well as to a storage medium in which a printer control program is stored. More particularly, the invention relates to a network adaptable printer which upon the occurrence of a print error such as paper jam, issues a request for resend of print data to ensure print results, and to its control method as well as to a storage medium having a printer control program stored therein.
2. Description of the Related Arts
Up until now, network adaptable printer apparatuses designed to directly connected to Ethernet LAN or the like serve to print out, on a page by page basis, print data with print commands that have been transferred from a host such as a mainframe or a server to the printer apparatuses by way of the network. In such network adaptable printer apparatuses, the paper print out is executed after normal reception of print data from the host, although if an error such as paper jam has occurred during the print out, the host is posted on the print error in the form of status from the printer apparatuses so that data transfer from the host is interrupted. In such a case, even print data that have been normally received from the host may have to be discarded due to the occurrence of error depending on the control program creation method on the printer side or on the environment of memories or the like possessed by the printer. For this reason, in order to assure the print results in the event of occurrence of any print error, even print data that have once been normally transferred will need recovery due to resending. Following are known recovery methods that can be employed upon the occurrence of any error with the aim of assuring the print results in the conventional printers.
I. Method in which the operator again makes a request for print through the host when recovery factors such as print errors have occurred;
II. Method in which print data are simply resent from the head of the job when recovery factors such as print errors have occurred;
III. Method in which print data received by the printer are kept by the printer side until the paper is output, to thereby assure the data.
IV. Method in which a print protocol for printing allows management of output pages between the printer and the host so that, when any recovery is carried out as a result of occurrence of a recovery factor such as print error, the host resends page data to be reprint.
However, such conventional error recovery methods for network adaptable printer apparatuses will entail the following problems. First, the method I in which the operator again makes a request for print through the host upon the occurrence of any recovery factor such as print error, will need a reprint instruction of the operator and may possibly need reactivation of the application. Also, for example, in case the print data are not saved at the host application level, the data must inefficiently be again created. The method II in which the print data are simply resent from the head of the job upon the occurrence of any recovery factor, will inconveniently start the reprint from the head of the job without any intervention of the operator, resulting in output of a plurality of same pages. For example, if an error such as paper jam has occurred at page 90 of 100-page job, the entire job is resent so that the output results from pages 1 to 90 will be repeated in vain. Furthermore, the method III in which the print data received by the printer are retained by the printer side until the paper is output to assure the data, will need large capacity of memories on the printer side to retain the data, which leads to an increased cost. Furthermore, the method IV in which the print protocol allows management of output pages between the printer and the host so that, when any recovery factor such as print error has occurred, data to be reprint are resent through the judgment processing of the host, will pose additional burden on the processing and may possibly result in a reduced operation speed, since for the resend of designated page data, the host side must refer to the print data from its head to retrieve the designated page while being conscious of the commands of the print data. Naturally, if no consideration is paid to the recovery, there may arise a problematic skip of the pages subjected to the paper jam since the printing is performed continuously after the occurrence of paper jam for example.
According to the present invention, there is provided a printer which upon the occurrence of a print error, is capable of resending print data easily and rapidly without a need for the host side to be conscious of the content of the print data on the printer side, to implement effective error recovery.
The present invention is directed to a printer serving to print out in sequence, on a desired print data length basis, print data transferred from a host associated by way of a network such as LAN. The present invention in the form of such a network adaptable printer comprises a link information creation unit which, every time receiving print data from the host, creates and saves link information indicative of a correlation between a transfer data position on the host side of the print data received and a print data position on the printer side; and a resend request unit which, when a print error has occurred during the print out, recognizes from the link information a transfer data position on the host side corresponding to a print data position at which the print error has occurred, to thereby issue a resend request to the host. Such a printer of the present invention eliminates any need for the host side to be conscious of pages on the printer side through reference to print data upon data resend from the host, thereby achieving easy and rapid recovery on a page by page basis.
The link information creation unit, every time receiving a packet containing print data from the host, creates and saves link information indicative of a correlation between a packet position on the network and a print data position. In this case, the resend request unit, when a print error such as paper jam has occurred during the print out, recognizes from the link information a packet position on the network corresponding to a print data position subjected to the print error, to thereby issue a request to the host for resend of print data from the packet position recognized. The link information creation unit includes a packet counter for counting the packet count every time receiving a packet containing print data from the host, a page counter for counting the page count every time creating print data on a page by page basis through combination of print data contained in the packet received, and a control memory for storing as link information the packet count of the packet counter and the page count of the page counter. At that time, the resend request unit recognizes from the link information a packet position on the network corresponding to the foremost position of a print page subjected to the print error, to thereby issue a request to the host for resend of print data. The link information creation unit further includes an offset counter, e.g., a byte counter, for counting the offset indicative of a data position within a received packet. In cases where print data obtained from the received packet are separated into an endmost portion of the current page and a foremost portion of the next page, in other words, where the print data of the received packet extend over two adjacent pages, the link information creation unit saves as link information the page count of the current page and the packet count of the received packet, and it further saves as link information the page count of the next page, the packet number of the same received packet and the offset value of the offset counter. The resend request unit, when a print error has occurred during the print out of a page having at its foremost position partial print data of the received packet, recognizes from the link information a packet position on the network corresponding to the page subjected to the error and a transfer start position within the packet, to thereby issue a request to the host for resend of print data.
In another aspect of the printer according to the present invention, the link information creation unit, every time receiving print data from the host, creates and saves link information indicative of a correlation between a packet position, in the application layer of the host, of received print data and a print data position. In this case, the link information creation unit, when a print error such as paper jam has occurred during the print out, recognizes from the link information a packet position in the application layer corresponding to a print data position at which the print error has occurred, to issue a request to the host for resend of print data starting from the packet position recognized. In this manner, the recovery is achieved by resending data on a packet by packet basis managed at the application layer level on the host side, so that there is no need for allowing for the transport layer and other underlying layers. For the data resending by packets at the application layer level, the link information creation unit includes an application packet counter for counting every time receiving separated print data from the host to consequently obtain print data having the data length of an application layer packet on the host side, a page counter for counting the page count every time creating print data on a page by page basis through combination of the print data received, and a control memory for storing as link information the packet count of the application packet counter and the page count of the page counter. In this event, the resend request unit recognizes from the link information an application packet position on the host side corresponding to the foremost position of a print page at which the print error has occurred, to thereby issue a request to the host for resend of print data. The link information creation unit further includes an offset counter, e.g., a byte counter, for counting the offset indicative of a data position within an application packet on the host side. In cases where print data of a received application packet are separated into an endmost portion of the current page and a foremost portion of the next page, namely, where the print data extend over two adjacent paged, the link information creation unit saves link information on the page count of the current page and the packet count of the received application packet into the control memory, and further saves link information on the page count of the next page, the packet number of the same received application packet and the offset value of the offset counter into the control memory. The resend request unit, when a print error has occurred during the print out of a page having at its foremost position partial data of the received application packet, recognizes from the link information an application packet position corresponding to the page at which the error has occurred and a transfer start position within the packet, to thereby issue a request to the host for resend of print data.
In a further aspect of the printer according to the present invention, the link information creation unit, every time receiving print data from the host, creates and saves link information indicative of a correlation between a transfer data position on the host side and a print data position on the printer side. At that time, the link information creation unit, when a print error such as paper jam has occurred during the print out, recognizes from the link information a position from the head of host side transfer data corresponding to a print data position at which the print error has occurred, to issue a request to the host for resend of print data starting from the position recognized. In this manner, printer side retains correlation of print data relative to the host side on a data byte count basis managed by the application layer level, thereby achieving easy and rapid recovery due to resend request as a result of the occurrence of any print error. The link information creation unit includes a byte counter which, every time receiving print data from the host, counts the byte count from the foremost position of the print data; a page counter which counts the page count every time creating print data on a page by page basis through combination of the print data received; and a link information storage unit which stores as link information the byte count of the byte counter and the page count of the page counter. At that time, the resend request unit recognizes from the link information the byte count from the foremost position of the print data corresponding to the foremost position of a print page at which the print error has occurred, to thereby issue a request to the host for resend of print data. The link information creation unit creates and saves link information indicative of a correlation between a transfer data position on the host side and a line position on the printer side. When a print error such as paper jam has occurred during the print out, the link information creation unit may recognize a transfer data position on the host side corresponding to a line at which the print error has occurred, to thereby issue a request for resend. The printer of the present invention may employ either synchronous system in which control for printing out on the printer side is provided in synchronism with control for print data transfer from the host or asynchronous system such as TCP/IP in which control for printing out on the printer side is provided in asynchronism with control for print data transfer from the host.
According to the present invention, there is provided a method of controlling a printer apparatus serving to print out in sequence, on a desired print data length basis, print data transferred from a host associated by way of a network. This method comprises a link information creation step in which, every time receiving print data from the host, link information is created and saved which is indicative of a correlation between a transfer data position on the host side of the print data received and a print data position on the printer side; and a resend request step in which, when a print error such as paper jam has occurred during the print out, there is recognized from the link information a transfer data position on the host side corresponding to a print data position at which the print error has occurred, so that a resend request to the host is issued.
Furthermore, according to the present invention, there is provided a computer readable storage medium having a printer control program stored therein, the storage medium comprising a reception module for receiving print data transferred from a host associated by way of a network; a link information creation module which, every time receiving print data from the host, creates and saves link information indicative of a correlation between a transfer data position on the host side of the print data received and a print data position on the printer side; and a resend request module which, when a print error such as paper jam has occurred during the print out, recognizes from the link information a transfer data position on the host side corresponding to a print data position at which the print error has occurred, to thereby issue a resend request to the host.
The above and other objects, aspects, features and advantages of the present invention will become more apparent from the following detailed description with reference to the accompanying drawings.